<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>部门列表页面</title>
    <link rel="stylesheet" href="/css/bootstrap.css" th:href="@{/css/bootstrap.css}">
</head>
<body>
<h1>部门列表</h1>
<table class="table table-striped">
    <tr>
        <td>部门编号</td>
        <td>部门名称</td>
        <td>操作</td>
    </tr>
    <tr th:each="d:${allDepts}">
        <td th:text="${d.deptCode}"></td>
        <td th:text="${d.deptName}">11</td>
        <td>
            <a th:href="@{/deptDetail(code=${d.deptCode})}" class="btn btn-primary">查看详情</a>
            <a th:href="@{/deptEdit(code=${d.deptCode})}" class="btn btn-success">编辑</a>
            <a th:href="@{/deptDel(code=${d.deptCode})}" class="btn btn-danger">删除</a>
        </td>
    </tr>
</table>
<p><a th:href="@{/deptCreate}">新建部门</a></p>
</body>
</html>